<template>
  <div class="common-layout">
    <el-container style="height: 100%;">
      <el-aside class="main-aside" width="60px">
        <div class="main-logo-container">
          <img class="main-logo" alt="Vue logo" src="../assets/logo.png" />
        </div>
        <div class="main-aside-item" @click="() => this.$router.push('/')">
          <el-icon class="main-aside-icon"><Shop /></el-icon>
          <div>DEMO</div>
        </div>
        <div class="main-aside-item" @click="() => this.$router.push('/tableDemo')">
          <el-icon class="main-aside-icon"><Shop /></el-icon>
          <div>TABLE</div>
        </div>
      </el-aside>
      <el-container>
        <el-header class="main-header">用户名</el-header>
        <el-main>
          <div id="master-view" v-if="$route.name">
            <router-view></router-view>
          </div>
          <div id="subapp-viewport" v-else></div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
</script>

<style scoped lang="scss">
.common-layout {
  height: 100%;
  color: #303133;

}
.main-header {
    background: #ffffff;
    border-bottom: 1px solid #ebeaea;
    height: 50px;
    text-align: right;
    line-height: 50px;
}


.main-aside {
  background-color: #303133;
  color: #ffffff;
  text-align: center;
  font-size: 14px;
}

.main-content {
  color: #303133;
}
.main-logo-container {
  text-align: center;
  margin: 40px 0 60px 0;
}
.main-logo {
  width: 30px;
}
.main-aside-item {
  margin: 40px 0;
  cursor: pointer;
}
.main-aside-icon {
  font-size: 24px;
  margin-bottom: 5px;
}
</style>
